package com.bc.bcmodel.enums;

/**
 * @Name EmailTemplateEnum
 * @Description TODO
 * @Author douhaichao
 * @Date 2018/9/14 13:15
 * @Version 1.0
 **/
public enum EmailTemplateEnum {
    REGISTER("User activation", "用户激活"),
    MODIFY_PWD("Modify password", "修改密码"),
    Reset_PWD("Reset password", "重置密码");
    private String zh;
    private String en;

    private EmailTemplateEnum(String en, String zh) { // 必须是private的，否则编译错误
        this.zh = zh;
        this.en = en;
    }

    public String zh() {
        return this.zh;
    }

    public String en() {
        return this.en;
    }

    public static EmailTemplateEnum EmailTemplateEnum(int index) {
        for (EmailTemplateEnum c : EmailTemplateEnum.values()) {
            if (c.zh().equals(index)) {
                return c;
            }
        }
        return null;
    }
}
